package service

import (
	"fmt"
	"water-temperature-server/models"
	_ "water-temperature-server/models"
)

type TemperatureService struct {
	BaseDao
}

func (e *TemperatureService) InsetBatch(data *[]models.WaterTemperaTure) error {
	dbs := e.db.GetDB("A")
	err := dbs.Create(&data).Error
	if err != nil {
		fmt.Printf("批量插入temaperature数据失败: %s", err)
		return err
	}
	return nil
}
